package cn.itcast.bos.delivery.quartz;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.itcast.bos.delivery.service.PromotionService;
import cn.itcast.bos.delivery.service.WayBillService;

public class DeadJob implements Job{
	
	@Autowired
	PromotionService promotionService;
	@Autowired
	private WayBillService wayBillService;
	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		// TODO Auto-generated method stub
		//任务详情
		System.out.println("更新");
		promotionService.deadJob(new Date());
		wayBillService.updateElastic();
	}

}
